Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[minor] don't enable appcontainer loopback on Windows 11 #875

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

akrantz
Copy link
Contributor

@akrantz akrantz commented Jul 21, 2024

I have been running into a prompt to enable loopback every time I start debugging on Windows 11. It seems like the appcontainer names for Edge changed, but there is also no need with Windows 11 to enable loopback, as it works when I continue.

This changes the debugging start command to skip enabling loopback when running on Windows 11. It also makes a change that it should enable loopback automatically instead of prompting.

I believe either of these should resolve the issue. I'm glad to discuss what change is actually desired.

  1. Do these changes impact command syntax of any of the packages? (e.g., add/remove command, add/remove a command parameter, or update required parameters)
    NO

  2. Do these changes impact documentation? (e.g., a tutorial on https://learn.microsoft.com/office/dev/add-ins/overview/office-add-ins)
    Is loopback documented? It might require a documentation update but not sure.

Validation/testing performed:
Describe manual testing done:

I validated the version check under the debugger and that it skipped the check.

@akrantz akrantz requested a review from a team as a code owner July 21, 2024 00:14
@millerds
Copy link
Contributor

There was a previous discussion about this: #840.

While Win11 changed the name of the containers, I believe it also depends on which webview (IE, v1, or v2) is being used at the time of sideloading that makes is required. On top of that, enabling loopback is an administrator operation (we call a shell command that requires admin privileges). The existing pattern was to ask because it is an admin operation (and potential security risk) and once it was enabled, we didn't have to ask anymore.

By not asking, we are essentially making security decision without the user's consent. On top of that, if they are not running as an administrator when we attempt to call the command, it will still fail. If they then later on sideload using a webview that requires it in order to work (I don't recall which ones do, but I'm confident webview2 doesn't), then the add-in won't load and there will be no indication as to why.

Updating the container names checked and enabled would be another way to help the situation, but I think that might still be incomplete. I think it would be nice to validate which webviews (and possibly OS combination) require the loopback enabling, adjust the check to look for that specifically, point out that it requires admin privileges, and verify the behavior with different versions of the host applications (including those that we support that still only use IE webview). But so far no one has committed to take the time to do that.

@akrantz
Copy link
Contributor Author

akrantz commented Oct 11, 2024

@millerds You told me about a workaround for this which I performed and then it was no longer an issue. Was it to run as admin?

Wouldn't this change still help? Would anyone be using legacy Edge or Internet Explorer on Windows 11? If it is just for a host such as Outlook, perhaps there is way we can skip this requirement for others hosts. Or perhaps we should have some way to mention the workaround which avoids the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants